package com.zezer.site.dao;

import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.SQLException;

public class ContactDao extends BaseDao{

	private Connection conn = null;
	private CallableStatement cs = null;

	public void addMessage(String message, String replyTo) {
		try {
			conn = getConnection();
			cs = conn.prepareCall("{call upsert_message(?,?)}");

			cs.setString(1, message);
			cs.setString(2, replyTo);

			executeCallableStatement(cs);
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			clean(conn, cs);
		}
	}
}
